/*
 * @Descripttion:
 * @LastEditors: xzh
 * @LastEditTime: 2024-01-20 19:00:19
 */
import type { object_Inf } from "@/utils/typings/index.type";
import request from "@/utils/request";
import equipManage_APi from "@/api/equipManage";

/*
 * @Descripttion:工厂接口类
 * @LastEditors: xzh
 * @LastEditTime: 2023-08-29 19:46:19
 */
export default class factoryManage_APi extends equipManage_APi {
  /**
   * @Author: xzh
   * @Descripttion: 获取工厂品质列表
   * @Param:
   */
  static getFactoryQualityList = (data: object_Inf): Promise<object_Inf> =>
    request({
      url: "/api/Statistics/GetAOIYieldRateStatisticsList",
      method: "post",
      data,
      headers: { "Content-Type": "application/json;charset=UTF-8" },
    });
  /**
   * @Author: xzh
   * @Descripttion:导出工厂品质数据
   * @Param:
   * @param {object_Inf} data
   */
  static exportFactoryQualityData = (data: object_Inf): object_Inf =>
    request({
      url: "api/Statistics/ExportAOIYieldRateStatistics",
      method: "post",
      data,
      responseType: "blob",
      headers: { "Content-Type": "application/json;charset=UTF-8" },
    });
  /**
   * @Author: xzh
   * @Descripttion: 获取工厂成本列表
   * @Param:
   */
  static getFactoryCostList = (data: object_Inf): Promise<object_Inf> =>
    request({
      url: "/api/Statistics/GetEquipmentUtilizationRateStatistics",
      method: "post",
      data,
      headers: { "Content-Type": "application/json;charset=UTF-8" },
    });
  /**
   * @Author: xzh
   * @Descripttion:导出工厂成本数据
   * @Param:
   * @param {object_Inf} data
   */
  static exportFactoryCostData = (data: object_Inf): object_Inf =>
    request({
      url: "/api/Statistics/ExportEquipmentUtilizationRateStatistics",
      method: "post",
      data,
      responseType: "blob",
      headers: { "Content-Type": "application/json;charset=UTF-8" },
    });
  /**
   * @Author: xzh
   * @Descripttion: 获取工厂交期列表
   * @Param:
   */
  static getFactoryDeliveryList = (data: object_Inf): Promise<object_Inf> =>
    request({
      url: "/api/Statistics/GetEquipmentOutputStatisticsList",
      method: "post",
      data,
      headers: { "Content-Type": "application/json;charset=UTF-8" },
    });
  /**
   * @Author: xzh
   * @Descripttion:导出工厂交期数据
   * @Param:
   * @param {object_Inf} data
   */
  static exportFactoryDeliveryData = (data: object_Inf): object_Inf =>
    request({
      url: "/api/Statistics/ExportEquipmentOutputStatistics",
      method: "post",
      data,
      responseType: "blob",
      headers: { "Content-Type": "application/json;charset=UTF-8" },
    });
}
